/*
 * memory.h
 *
 *  Created on: 2011/07/02
 *      Author: AKS
 */

#ifndef MEMORY_H_
#define MEMORY_H_

#include "core/include/types.h"

/* system function for memory */
void InitMemory(DWORD baseAdr, DWORD size);
BOOL Memory_check(DWORD baseAdr, DWORD size);

/* base function for memory allocate */
DWORD  Memory_allocate(DWORD size);
BOOL   Memory_free(DWORD adr);

/* DMA function */
typedef void (*DMA_FINISHED_CALLBACK)(BOOL);
BOOL Memory_startDMA(DWORD src, DWORD dst, WORD size, DMA_FINISHED_CALLBACK callback);

#endif /* MEMORY_H_ */
